﻿using System.Collections.Generic;

namespace Bilibili.Model.Bangumi
{
    public sealed class BangmiHome
    {
        public int Code { get; set; }
        public string Message { get; set; }
        public BangmiHome Result { get; set; }
        public BangmiHome Ad { get; set; }
        public List<BangmiHome> Head { get; set; }
        public int Id { get; set; }
        public string Img { get; set; }
        public string Link { get; set; }
        public string Title { get; set; }
        public List<BangmiHome> End_Recommend { get; set; }
        public BangmiHome Previous { get; set; }
        public List<BangmiHome> List { get; set; }
        private string _cover;
        public string Cover
        {
            get { return _cover + "@300w.jpg"; }
            set { _cover = value; }
        }
        public string Favourites { get; set; }
        public string Season_Id { get; set; }
        public string FavouritesCount
        {
            get
            {
                try
                {
                    double i = double.Parse(Favourites);
                    double d = i / 10000;
                    if (d >= 1)
                        return d.ToString("0.0") + "万";
                    else
                        return Favourites;
                }
                catch { return 0.ToString(); }
            }
        }
        public List<BangmiHome> Serializing { get; set; }
        public string Newest_Ep_Index { get; set; }
        public string Watching_Count { get; set; }
    }
}